#!/bin/bash

if [ `whoami` != "root" ]; then
    echo "需要以root用户执行"
    exit -1;
fi

echo 替换镜像源开始
cp /etc/yum.repos.d/openEuler.repo   /etc/yum.repos.d/openEuler-raw.repos
cp openEuler.repo-ok /etc/yum.repos.d/openEuler.repo

echo 替换DNS解析文件
cp resolv.conf /etc/resolv.conf

date -s 20250313
yum clean all
yum makecache

echo 替换镜像源完成
